<?php



namespace App\Services\Member\Models;

use App\Services\Business\Models\Role;
use Illuminate\Database\Eloquent\Model;

class Family extends Model
{

    protected $table = 'family';

    protected $fillable = [
        'user_id','name', 'avatar'
    ];




        public function member()
    {
        return $this->belongsToMany(User::class, 'family_member', 'family_id', 'user_id')->withTimestamps();
    }


    public function points()
    {
        return $this->hasmany(Points::class, 'family_id');
    }

}

